package com.rockwell.sniffyhunter.utils;

import com.rockwell.sniffyhunter.model.RobotCommandSequencer;

public enum RobotCommandSequencerState implements IStateMachine {
	START {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return SEND;
		}
	},
	SEND {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((RobotCommandSequencer)stateObject).performSendCommand();
		}
	},
	WAIT {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((RobotCommandSequencer)stateObject).performWaitCommandDone();
		}
	},
	ERROR {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((RobotCommandSequencer)stateObject).performHandleError();
		}
	}, 
	DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			System.out.println("Perform Done actions");
			return START;
		}
	},
}
